<%--
  Created by IntelliJ IDEA.
  User: Julius
  Date: 2025/3/26
  Time: 17:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>编辑同学信息</title>
    <style>
        .form-container {
            width: 500px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: block;
            margin-bottom: 5px;
        }
        input[type="text"], textarea {
            width: 100%;
            padding: 8px;
            box-sizing: border-box;
        }
        textarea {
            height: 100px;
        }
        .error {
            color: red;
        }
        .buttons {
            margin-top: 15px;
        }
    </style>
</head>
<body>
<div class="form-container">
    <h2>编辑同学信息</h2>
    <span class="error">${msg}</span>
    <form action="editStudent" method="post">
        <input type="hidden" name="id" value="${student.id}">
        <div class="form-group">
            <label for="name">姓名:</label>
            <input type="text" id="name" name="name" value="${student.name}" required>
        </div>
        <div class="form-group">
            <label for="nickn">外号:</label>
            <input type="text" id="nickn" name="nickn" value="${student.nickn}">
        </div>
        <div class="form-group">
            <label for="ast">星座:</label>
            <input type="text" id="ast" name="ast" value="${student.ast}">
        </div>
        <div class="form-group">
            <label for="con">联系方式:</label>
            <input type="text" id="con" name="con" value="${student.con}">
        </div>
        <div class="form-group">
            <label for="imp">我眼中的他:</label>
            <textarea id="imp" name="imp">${student.imp}</textarea>
        </div>
        <div class="buttons">
            <button type="submit">保存</button>
            <a href="stu">取消</a>
        </div>
    </form>
</div>
</body>
</html>
